<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('部署流程')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-notice-add">
			<div class="form-group">	
				<label class="col-sm-2 control-label is-required">流程分类：</label>
				<div class="col-sm-10">
					<select name="category" th:with="type=${@dict.getType('act_category')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">流程文件：</label>
				<div class="col-sm-10">
					<input id="singleFile" name="file" type="file">
					<span class="help-inline">支持文件格式：zip、bar、bpmn、bpmn20.xml</span>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-offset-5 col-sm-10">
					<button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
					<button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
				</div>
			</div>
		</form>
	</div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: summernote-js" />
    <script type="text/javascript">
        var prefix = ctx + "activiti/definition";

		function submitHandler() {
	        if ($.validate.form()) {
				$.operate.save(prefix + "/uploadStreamAndDeployment", $('#form-notice-add').serialize());
	        }
	    }
	</script>
</body>
</html>
